package springboot.app.web ;

import javax.annotation.Resource ;

import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.beans.factory.annotation.Qualifier ;
import org.springframework.web.bind.annotation.GetMapping ;
import org.springframework.web.bind.annotation.RestController ;

import springboot.app.common.IBaseService ;
import springboot.app.conf.DatasourceProperties ;

/**
 * @author 80002165 @date 2017年7月7日 下午5:31:58
 */
@RestController
public class TestController {
    
    // 泛型注入
    @Resource
    IBaseService<String> stringService ;
    
    @Resource
    @Qualifier("long1")
    IBaseService<Long> longService ;
    
    @Resource
    @Qualifier("long2")
    IBaseService<Long> long2Service ;
    
    @GetMapping("/test")
    public String test() {
        return "hello springboot !" ;
    }
    
    @GetMapping("/test/testConfiguration")
    public String test2() {
        return "test:" + stringService.printT("fang") + "," + longService.printT(23l)+","+long2Service.printT(22l) ;
    }
}
